import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/api/oauth/user/token',
    method: 'post',
    params: data
  })
}

export function register(data) {
  return request({
    url: '/api/oauth/user/register',
    method: 'post',
    params: data
  })
}

export function getInfo() {
  return request({
    url: '/api/admin/getUserInfo',
    method: 'post'
    // params: {  }
  })
}

export function logout() {
  return request({
    url: '/api/oauth/user/logout',
    method: 'post'
  })
}

export function sendCode(data) {
  return request({
    url: '/api/oauth/user/send/code',
    method: 'post',
    params: data
  })
}
